﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 两侧弧度三角形 子弹
/// </summary>
public class TwoTriangleGun : CurveGun
{
    public override void Fire()
    {
        if (CanFire(lastFireTime))
        {
            lastFireTime = Time.time;

            for (int i = 0; i < firePoints.Length; i++)
            {
                FireOnePoint(i);
            }
        }
    }

    protected override Quaternion CaculRot(Transform firepoint, int total, int index)
    {
        return firepoint.rotation * Quaternion.Euler(0, 0, (index - total / 2f) * angle / total);
    }
}
